//
//  SCNToolsViewTableViewCell.swift
//  ShoucainuSwift
//
//  Created by 王家旭 on 2017/5/12.
//  Copyright © 2017年 Riluee. All rights reserved.
//

import UIKit

class SCNToolsViewTableViewCell: UITableViewCell {

    // icon
    lazy var iconImageView: UIImageView = {
        
        let imgView = UIImageView()
        imgView.image = UIImage(named: "icon_study_encourage")
        return imgView
    }()
    // 标题
    lazy var titleL: UILabel = {
        
        let lab = UILabel()
        lab.textColor = SCNConstants.colorFromHexValue(0x333333, alpha: 1)
        lab.font = UIFont.systemFont(ofSize: 15.5)
        return lab
    }()
    // 说明
    lazy var detailL: UILabel = {
        
        let lab = UILabel()
        lab.textColor = SCNConstants.colorFromHexValue(0x898989, alpha: 1)
        lab.font = UIFont.systemFont(ofSize: 12.0)
        return lab
    }()
    
    override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        
        self.accessoryType = .disclosureIndicator
        
        contentView.addSubview(iconImageView)
        contentView.addSubview(titleL)
        contentView.addSubview(detailL)
        
        iconImageView.snp.makeConstraints { (make) in
            make.size.equalTo(CGSize(width: 45,height: 45))
            make.top.equalTo(7)
            make.leading.equalTo(16)
        }
        titleL.snp.makeConstraints { (make) in
            make.top.equalTo(10)
            make.leading.equalTo(70)
            make.height.equalTo(24)
            make.trailing.equalTo(0)
        }
        detailL.snp.makeConstraints { (make) in
            make.top.equalTo(titleL.snp.bottom)
            make.leading.equalTo(70)
            make.height.equalTo(24)
            make.trailing.equalTo(0)
        }
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
}
